{
  "properties" : { },
  "id" : "e40b9c20845045b3937d23df7eb621f3",
  "script" : null,
  "groupId" : "5e08b223a1574fc18b3818c72634a0ab",
  "name" : "查询告警联系人列表",
  "createTime" : 1727070930112,
  "updateTime" : 1724892714579,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "list",
  "method" : "GET",
  "parameters" : [ {
    "name" : "username",
    "value" : "顺",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 2,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": [\n            {\n                \"id\": 5,\n                \"username\": \"张顺昱\",\n                \"email\": \"17843097694@163.com\",\n                \"phone\": \"17792406971\",\n                \"rowId\": 1\n            },\n            {\n                \"id\": 6,\n                \"username\": \"冯章\",\n                \"email\": \"466565147@qq.com\",\n                \"phone\": \"18100000005\",\n                \"rowId\": 2\n            }\n        ]\n    }\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
var sql = """
    SELECT * FROM alarm_contact
    <where>
        <if test="username != null and username != ''">
            and username like concat('%',#{username} ,'%')
        </if>
    </where>
"""

return db.page(sql) 